package com.bookcloud.java21.chapter5.静态方法static56;

public class StaticMethodsTest {
  public static void main(String[] args) {
    // 调用静态方法
    StaticMethods.staticMethod();
    // 调用实例方法
    StaticMethods sm = new StaticMethods();
    sm.instanceMethod();
    // 调用静态的工具方法
    StaticMethods.calculate(10, 20);
    // 调用静态工厂
    for (int i = 0; i < 3; i++) {
      StaticMethods sm2 = StaticMethods.createStaticMethods();
      System.out.println(sm2);
      System.out.println(sm2.id);
    }
  }
}
